/**
 * 2025/01/01 - 2025/12/31
 */
package com.snail.server.iam.menu.mapping;

import com.snail.server.iam.menu.entity.Menu;
import com.snail.server.iam.menu.vo.MenuVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingConstants;

/**
 *
 * @author zgadmin
 * @date 2025/9/26 18:09
 *
 */
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
public interface MenuMapping {

    @Mapping(target = "status", expression = "java(menu.getStatus().getValue())")
    @Mapping(target = "type", expression = "java(menu.getType().getValue())")
    MenuVO toMenuVO(Menu menu);

}
